package com.bh.weapp.controller.customer;

import com.bh.common.core.controller.BaseController;
import com.bh.common.core.page.TableDataInfo;
import com.bh.extend.domain.JcDbProduct;
import com.bh.extend.service.IJcDbProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 客户货品Controller
 *
 * @author slx
 * @date 2023-03-26
 */
@Api(tags = {"CUST客户货品API"})
@RestController
@RequestMapping("/api/cust/extend/dbProduct")
public class JcDbProductCustApiController extends BaseController {

    @Autowired
    private IJcDbProductService jcDbProductService;

    /**
     * 查询客户货品列表
     */
    @ApiOperation("查询客户货品分页列表")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody JcDbProduct jcDbProduct) {
        startPage();
        List<JcDbProduct> list = jcDbProductService.selectJcDbProductList(jcDbProduct);
        return getDataTable(list);
    }
}
